﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for TestsBL
/// </summary>
public class TestsBL : TestsProperties
{
    public TestsBL()
    {
        //
        // TODO: Add constructor logic here
        //
    }
    public TestsBL(DateTime timeOffset, DateTime expires, bool showSolutions, int noOfQuestions, long userId, long difId, long categoryId, string testName)
    {
        this.TimeOffset = timeOffset;
        this.Expires = expires;
        this.ShowSolutions = showSolutions;
        this.NoOfQuestions = noOfQuestions;
        this.UserId = userId;
        this.DifId = difId;
        this.CategoryId = categoryId;
        this.TestName = testName;
    }
    public TestsBL(long testId, DateTime timeOffset, DateTime expires, bool showSolutions, int noOfQuestions, long userId, long difId, long categoryId, string testName)
    {
        this.TestId = testId;
        this.TimeOffset = timeOffset;
        this.Expires = expires;
        this.ShowSolutions = showSolutions;
        this.NoOfQuestions = noOfQuestions;
        this.UserId = userId;
        this.DifId = difId;
        this.CategoryId = categoryId;
        this.TestName = testName;
    }
    public TestsBL(long testId)
    {
        this.TestId = testId;
    }
    public bool Insert()
    {
        return TestsDL.Insert(this);
    }

    public bool Update()
    {
        return TestsDL.Update(this);
    }

    public bool Delete()
    {
        return TestsDL.Delete(this);
    }

    public bool InsertTestname()
    {
        throw new NotImplementedException();
    }
}